package edu.ynu.se.xiecheng.achitectureclass.GreenHouse.GreenhouseEntity;

import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

//磷
@Getter
@Setter
@Entity
@Table(name = "phosphorus")//请将 {sensor_type} 替换为具体的传感器类型，例如 tb_soil_detection_nitrogen。
public class PhosphorusData extends LogicEntity {
    @Column(nullable = false)
    private String name; // 传感器名称

    @Column(nullable = false)
    private Double value; // 数据值

    @ManyToOne
    @JoinColumn(name = "device_id", nullable = false)
    private Device deviceInfo; // 所属设备
}